package com.yuzhitong.shapi.model;

import com.yuzhitong.shapi.base.Contents;
import com.yuzhitong.shapi.base.net.BaseListBean;
import com.yuzhitong.shapi.base.net.BaseObjectBean;
import com.yuzhitong.shapi.bean.MovieBean;
import com.yuzhitong.shapi.bean.PlayListBean;
import com.yuzhitong.shapi.contract.PlayContract;
import com.yuzhitong.shapi.net.RetrofitClient;

import java.util.Map;

import io.reactivex.rxjava3.core.Observable;

/**
 * Created by Brsya
 * CreateDate: 2022/5/28  11:36
 * Description:
 * 播放页面
 */
public class PlayModel implements PlayContract.Model {


    @Override
    public Observable<BaseObjectBean<PlayListBean>> getHot(Map<String, Object> par) {
        return RetrofitClient.getInstance().getApi().getVideoById(Contents.BASE_URL + "/videos/getVideosInfoByid", par);
    }

    @Override
    public Observable<BaseObjectBean<String>> getPlayAddress(Map<String, Object> par) {
        return RetrofitClient.getInstance().getApi().getPlayAddress(Contents.BASE_URL + "/videos/getPlayerUrl", par);
    }

    @Override
    public Observable<BaseListBean<MovieBean>> getLike(Map<String, Object> par) {
        return RetrofitClient.getInstance().getApi().getLike(Contents.BASE_URL + "/videos/getLike", par);
    }
}
